﻿<controls:ChildWindow x:Class="ICIA.ARojas.Visual.Destino.DestinoModal"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:Didsoft_Silverlight_Controls="clr-namespace:Didsoft.Silverlight.Controls;assembly=Didsoft.Silverlight.Controls" 
             xmlns:Didsoft_Silverlight_Controls_Data="clr-namespace:Didsoft.Silverlight.Controls.Data;assembly=Didsoft.Silverlight.Controls.Data"
             
              xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           Width="828" Height="519" 
           Title="DestinoModal">
    <Grid x:Name="LayoutRoot" >

        <Didsoft_Silverlight_Controls:FormHeader DescriptionText="Datos Personales" TitleText="Destinos" Margin="0,0,0,0">
            <toolkit:BusyIndicator Name="busyIndicator1" BusyContent="Espere mientras procesamos su peticion" IsBusy="{Binding IsBusy,Mode=TwoWay}">
                <Grid>
                    <Image HorizontalAlignment="Left" Margin="8,25,0,267" Width="109" Source="foto.jpg" Name="fotoPersonal" Height="137" />
                    <sdk:DataGrid AutoGenerateColumns="False"  Margin="133,51,9,0" Height="111" VerticalAlignment="Top" ItemsSource="{Binding Cursos, Mode=TwoWay}">
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="Fecha" Width="70" Binding="{Binding FechaRealizacion,Mode=TwoWay}"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Nombre Curso" Width="200" Binding="{Binding Curso.NombreCurso,Mode=TwoWay}"></sdk:DataGridTextColumn>
                            <sdk:DataGridTextColumn Header="Descripcion" Width="300" Binding="{Binding Descripcion,Mode=TwoWay}"></sdk:DataGridTextColumn>
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                    <TextBlock Height="22" Margin="132,26,248,0" TextWrapping="Wrap" Text="Cursos" VerticalAlignment="Top" FontSize="13.333" FontWeight="Bold"/>
                    <TextBlock Height="22" Margin="8,0" TextWrapping="Wrap" Text="{Binding PersonaSeleccionada,Mode=TwoWay}" VerticalAlignment="Top" FontSize="13.333" FontWeight="Bold" Width="794" />
                    <sdk:DataGrid Margin="8,0,0,40" AutoGenerateColumns="False" Height="181" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="793" ItemsSource="{Binding Destinos, Mode=TwoWay}" SelectedItem="{Binding DestinoSeleccionado, Mode=TwoWay}">
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="Gestion" Binding="{Binding Gestion,Mode=TwoWay}" IsReadOnly="True"/>
                            <sdk:DataGridTextColumn Header="Destino" Binding="{Binding DestinoFisico.Nombre,Mode=TwoWay}" IsReadOnly="True"/>
                            <sdk:DataGridTextColumn Header="Cargo" Binding="{Binding Cargo.NombreCargo,Mode=TwoWay}" IsReadOnly="True"/>
                            <sdk:DataGridCheckBoxColumn Header="Obs.?" Binding="{Binding TieneObservaciones,Mode=TwoWay}" IsReadOnly="True"/>
                            <sdk:DataGridTextColumn Header="Registrado Por" Binding="{Binding RegistradoPor,Mode=TwoWay}" IsReadOnly="True"/>
                            
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                    
                    <TextBlock Height="22" Margin="8,0,0,227" TextWrapping="Wrap" Text="Destinos" VerticalAlignment="Bottom" FontSize="13.333" FontWeight="Bold" HorizontalAlignment="Left" Width="220"/>
                    <Button Content="Asignar" HorizontalAlignment="Right" Height="26" Margin="0,0,9,8" VerticalAlignment="Bottom" Width="152" Command="{Binding CmdAsignar, Mode=TwoWay}"/>
                    <Button Content="Ratificar" Height="26" Margin="494,0,168,8" VerticalAlignment="Bottom" Command="{Binding CmdRatificar, Mode=TwoWay}"  Width="148" />
                    <Button Content="Modificar" Height="26" Margin="340,0,322,8" VerticalAlignment="Bottom" Command="{Binding CmdModificar, Mode=TwoWay}"  Width="148" CommandParameter="{Binding DestinoSeleccionado,Mode=TwoWay}"/>
                    <Button Content="Observaciones" Height="26" Margin="8,0,0,8" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="145" Command="{Binding CmdObservaciones}" CommandParameter="{Binding DestinoSeleccionado,Mode=TwoWay}"/>
                    <Button Content="Agregar Curso" Height="23" HorizontalAlignment="Left" Margin="700,25,0,0" Name="button1" VerticalAlignment="Top" Width="101" Click="button1_Click" />
                </Grid>
            </toolkit:BusyIndicator>
        </Didsoft_Silverlight_Controls:FormHeader>
    </Grid>
</controls:ChildWindow>